package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-10-30
 * Time: 16:39
 */
public class Test1 {
    public int year;
    public int mounth;
    public int day;

    public Test1(){
        this.year = 2005;
        this.mounth = 2;
        this.day = 6;
        System.out.println("+++++++");
    }
    public Test1(int year, int mounth, int day) {
            this.year = year;
            this.mounth = mounth;
            this.day = day;
    }
    public void serDate(int year, int mounth, int day){
        this.year = year;
        this.mounth = mounth;
        this.day = day;

    }
    public void printDate(){
        System.out.println("年："+ this.year+"  月："+this.mounth+"  日:"+this.day);
    }
    public static void main(String[] args) {
        Test1 test1 = new Test1(2002,9,6);
        Test1 test2 = new Test1(2005,2,6);
        test1.printDate();
        test2.printDate();
    }
}
